home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
examples.arc
/
EXAMPL24.PRO
< prev
next >
Wrap
Text File
|
1986-10-07
|
361b
|
18 lines
/* Program 24 */
domains
list = integer*
predicates
readlist(list)
goal
write("Enter a list of integers--\nfor example:\n1<ENTER>\n2<ENTER>\n3<ENTER><ENTER>\nwill return [1,2,3]\n"),
readlist(L),
write("\nThe Turbo Prolog list is ",L).
clauses
readlist([H|T]) :- readint(H),!,
readlist(T).
readlist([]).